﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace NetDon.OA.Portal.Controls
{
    public partial class Address : System.Web.UI.UserControl
    {
        public string ProvinceId
        {
            get { return (string) ViewState["ProvinceId"]; }
            set { ViewState["ProvinceId"] = value; }
        }
        public string CityId
        {
            get { return (string) ViewState["CityId"]; }
            set { ViewState["CityId"] = value; }
        }
        public string AreaId
        {
            get { return (string)ViewState["AreaId"]; }
            set { ViewState["AreaId"] = value; }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ProvinceId = ddlProvince.SelectedValue;
                CityId = ddlCity.SelectedValue;
                AreaId = ddlArea.SelectedValue;
            }
        }

        protected override void OnPreRender(EventArgs e)
        {
            ddlProvince_CascadingDropDown.SelectedValue = ProvinceId;
            ddlCity_CascadingDropDown.SelectedValue = CityId;
            ddlArea_CascadingDropDown.SelectedValue = AreaId;
            base.OnPreRender(e);
        }

         
    }
}